import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

t=np.linspace(0,10,512)
x=np.exp(-1*t)

num=np.array([2,3,0])
den=np.array([1,2,5])

tout,yout,xout=signal.lsim((num,den),x,t)

plt.rcParams['font.sans-serif']=['SimHei']#加上这一句就能在图表中显示中文
plt.rcParams['axes.unicode_minus']=False#用来正常显示负号

plt.plot(tout,yout)
plt.xlabel('t(s)')
plt.ylabel('y(t)')
plt.title('系统输出')
plt.show()
